<template>
  <div class="order-detail-page" v-if="order">
    <!-- 操作栏 -->
    <DetailAction :order="order" />
    <!-- 步骤条 组件xtx-steps.vue-->
    <DetailSteps :order="order"></DetailSteps>
    <!-- 物流栏 -->
    <!-- 订单商品信息 -->
    <OrderInfo :order="order"></OrderInfo>
  </div>
</template>
<script>
import DetailAction from './components/detail-action'
import DetailSteps from './components/detail-steps'
import OrderInfo from './components/detail-info'
import { findOrderDetail } from '@/api/order'
import { ref } from 'vue'
import { useRoute } from 'vue-router'
export default {
  name: 'OrderDetailPage',
  components: { DetailAction, DetailSteps, OrderInfo },
  setup() {
    const order = ref(null)
    const route = useRoute()
    findOrderDetail(route.params.id).then(data => {
      order.value = data.result
    })
    return { order }
  }
}
</script>
<style scoped lang="less">
.order-detail-page {
  background: #fff;
  height: 100%;
}
</style>
